package red.stu.mc.mod.codeblock.util.socket;

import java.net.Socket;

import red.stu.mc.mod.codeblock.util.socket.ServerSocket.ClientSocket;

public interface ServerSocketCallback {
	
	/**
	 * 客户端将要加入
	 * @param socket
	 * @return
	 */
	public boolean onBeforeClientJoin(Socket socket);
	
	/**
	 * 客户端加入
	 * @param socket 客户端
	 * @return
	 */
	public void onClientJoin(ClientSocket socket);
	
	public void onClientExit(ClientSocket socket);
	
	/**
	 * 客户端数据到达
	 * @param socket
	 * @param data
	 * @return
	 */
	public void onClientData(ClientSocket socket, String data);
	
}
